from typing import List, Optional
from pydantic import BaseModel, EmailStr

from app.expertise.schemas import ExpertiseRelated


class CustomerBase(BaseModel):
    legal_entity: bool
    first_name: str
    last_name: str
    patronymic: str
    address: str
    phone_number: str
    email: Optional[EmailStr]


class CustomerCreate(CustomerBase):
    pass


class CustomerUpdate(CustomerBase):
    pass


class CustomerRelated(CustomerBase):
    id: int
    expertises: List[ExpertiseRelated]


class CustomerSchema(CustomerBase):
    id: int
